﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Text;
using System.IO;

public partial class ArticlesCategory : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }


    [WebMethod]
    public static string LoadControl(int type)
    {
        StringBuilder htmlResponse = new StringBuilder();
        using (StringWriter sw = new StringWriter(htmlResponse))
        {
            using (HtmlTextWriter textWriter = new HtmlTextWriter(sw))
            {
                UserControl myControl = new UserControl();
                UserControls_Category cl = (UserControls_Category)myControl.LoadControl("~/UserControls/Category.ascx");
                cl.pages = type;
                cl.RenderControl(textWriter);
            }
        }
        return htmlResponse.ToString();
    }
}